package style.Leetcode.初级算法.DynamicProgramming.DynamicProgramming_20220920_1_爬楼梯;

/**
 * todo 未编写
 */
public class Solution {
    /**
     * 思路一：递归
     */
    public int climbStairs(int n) {
        return Fibonacci(n, 1, 1);
    }

    private int Fibonacci(int n, int a, int b) {
        if (n <= 1)
            return b;
        return Fibonacci(n - 1, b, a + b);
    }



    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.climbStairs(5));
    }
}
